<!--
#  Copyright 2008, Javid Jamae and Peter Johnson
# 
#  Licensed under the Apache License, Version 2.0 (the "License"); you may not
#  use this file except in compliance with the License. You may obtain a copy
#  of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
#  
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#  License for the specific language governing permissions and limitations
#  under the License.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>
<link rel="STYLESHEET" href="../ch00/image/jbia.css" type="text/css" />
<title>JBIA - Managing the JBoss Application Server</title>
</head>

<body>

<h1>Ch 2 - Managing the JBoss Application Server</h1>
<p>All build targets create an application server configuration named <code>
admin</code>. After the build, to run the application server, open another command
window, <code>cd</code> to the applications server's <code>bin</code> directory,
and enter:</p>
<table class="command">
  <tr>
    <td class="commandText">./run.sh -c admin</td>
    <td>(Linux)</td>
  </tr>
  <tr>
    <td class="commandText">run -c admin</td>
    <td>(Windows)</td>
  </tr>
</table>
<p>None of the targets create a database.</p>
<hr />
<table class="target">
  <tr>
    <th>Target:</th>
    <td class="targetNumber">01</td>
  </tr>
  <tr>
    <th>Section:</th>
    <td>2.2.1 & 2.2.3</td>
  </tr>
  <tr>
    <th>Description:</th>
    <td>Creates an application server configuration with various logging
    configuration changes and using the system properties service.</td>
  </tr>
  <tr>
    <th colspan="2">After the build:</th>
  </tr>
</table>
<p>Search for the text &quot;JBIA&quot; in the <code>server/admin/conf/jboss-log4j.xml</code>
file to locate the logging configuration changes.</p>
<p>To see that the logging configuration changes in action, access the
example voting application at <a target="_blank"
  href="http://localhost:8080/vote">http://localhost:8080/vote</a>. Each time
you access the application a line is written to the log file. Now look in the <code>server/admin/log</code>
directory and you should see:</p>
<ul>
  <li>Several <code>server.log</code> files, because the rolling appender
  was limited to 500KB and starting up the application server typically
  generates around 900KB of logging</li>
  <li>A <code>jbia.log</code> file containing the logging for the example
  voting application</li>
</ul>
<p>To see that the system properties service in action, change the property
values in the file <code>server/admin/conf/jbia.properties</code>, restart the
application server, and access the voting application again. The text displayed
and the logging entries should reflect your changes.</p>
<p>Also, you can use the JMX Console to view the <code>jboss:type=Service,name=SystemProperties</code>
MBean. Invoke the <code>showAll()</code> operation and look for the properties
starting with &quot;jbia&quot;.</p>
<hr />
<p align="center">&copy; 2008, Javid Jamae and Peter Johnson</p>
</body>

</html>
